<template>
  <div style="padding: 20px 20px 0 20px">
    <el-row style="width: 100%">
      <el-form :inline="true" :model="search" class="demo-form-inline">
        <el-form-item label="查询条件">
          <el-select
            v-model="search.type"
            placeholder="请选择...">
            <el-option v-for="(item,index) in selectObj" :key="index" :label="item.name" :value="item.id" />
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-input v-model="search.text" placeholder="请输入..." clearable/>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" style="margin-left: 10px;margin-top: 0;" @click="searchData">查询</el-button>
          <slot name="search" />
        </el-form-item>
      </el-form>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'SearchNav',
  props: {
    search: {
      type: Object,
      required: true,
      default: () => {
        return {
          text: '',
          type: ''
        }
      }
    },
    selectObj: {
      type: Array,
      required: true,
      default: () => {
        return []
      }
    }
  },
  data() {
    return {}
  },
  created() {

  },
  methods: {
    searchData() {

    }
  }
}

</script>

<style scoped>
  .filter-container{
    margin-bottom: 20px;
  }
  .filter-item{
    margin-right: 10px;
  }
  .fillcontain {
    width: 100%;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
  }
  .pagination {
    text-align: right;
    margin-top: 10px;
  }
  .checkbox-style{
    padding-bottom: 20px;
    padding-left: 30px;
    padding-right: 30px;
    width: 100%;
  }
  .el-status:hover{
    cursor: pointer;
  }
</style>
